package com.twu.biblioteca;

public class UserAccount {
    private String username;
    private String password;

   public UserAccount() {
        username = null;
        password = null;
    }

    public UserAccount(final String username,final String password){
        this.username=username;
        this.password=password;
    }

    public final String getUsername() {
       return username;
    }

    public String getPassword() {
       return password;
    }

    public void activate(UserAccount userAccount) {
        this.username = userAccount.username;
        this.password = userAccount.password;
    }

    public void deactivate() {
        username = null;
        password = null;
    }

    public final boolean isActive() {
        return username != null && password != null;
    }

}
